<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:p="http://primefaces.org/ui"
                template="/templates/ui.xhtml">

    <ui:define name="head">
        <style type="text/css">
            .col-label {
                width: 110px;
                text-align: right;
            }

            .col-label2 {
                /*padding-left: 80px;*/
                width: 110px;
                text-align: right;
            }

            .col-input {
                width: 180px;
            }

            .col-qry1 {
                width: 50%;
            }
        </style>
        <script language="JavaScript" type="text/JavaScript">
            function setpathvalue(obj) {
                document.getElementById("editForm:hidfileimp").value=obj.value;
            }
        </script>
    </ui:define>

    <ui:define name="content">
        <div style="margin:5px;">
            <p:growl id="msgs" showDetail="false"/>
            <h:form id="editForm">
                <p:panel header="导入">
                    <h:panelGrid width="100%" cellspacing="0" border="0" columns="2" columnClasses="col-qry1">
                        <h:panelGroup>
                            <h:panelGrid cellspacing="0" border="0" columns="2">
                                <h:outputLabel value="选择文件:"/>
                                <input style="width:360px;" id="fileimp" type="file" value="" onchange="setpathvalue(this)"></input>
                                <h:inputHidden id="hidfileimp" value="#{importAction.filepath}"/>
                            </h:panelGrid>
                        </h:panelGroup>
                        <h:panelGrid cellspacing="0" border="0" columns="1">
                            <h:panelGroup>
                                <p:commandButton style="width:60px;" ajax="true"
                                                 id="btnImp" update="msgs"
                                                 value="导入" action="#{importAction.onBtnImpClick}"
                                                 ></p:commandButton>
                            </h:panelGroup>
                        </h:panelGrid>
                    </h:panelGrid>
                </p:panel>
                <p:ajaxStatus style="height:18px;text-align:center">
                    <f:facet name="start">
                        <h:graphicImage value="/images/ajaxloadingbar.gif"/>
                    </f:facet>
                    <f:facet name="complete">
                        <h:outputText value=""/>
                    </f:facet>
                </p:ajaxStatus>


            </h:form>
        </div>
    </ui:define>

</ui:composition>